package 笔试.京东;

import jdk.nashorn.internal.ir.IfNode;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;
import java.util.concurrent.ExecutorService;

/**
 * @author:谢君臣
 * @Date:2021/10/9-20:33
 * @version:1.0
 * @function:
 */
public class Main01 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int k = scanner.nextInt();
        int x = scanner.nextInt();
        int arr [] = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = scanner.nextInt();
        }
        Arrays.sort(arr);
        int res =1;
        ArrayList<Integer> arrayList = new ArrayList<>();
        for (int i = 1; i <n ; i++) {
            if (arr[i]-arr[i-1]>x) {
                arrayList.add(arr[i]);
                arrayList.add(arr[i-1]);
                res++;
            }
        }
        int j =0;
        while (k > 0 && arrayList.size()>0) {
            if (arrayList.get(0)-arrayList.get(1)<=2*x) {
                res--;
                k--;
            }
            arrayList.remove(0);
            arrayList.remove(0);
        }

        System.out.println(res);
    }

}
